{% extends "base.html" %}
{% load add_field_css i18n %}

{% block page-title %}🔐{% trans "Password Change" context "page title" %}{% endblock %}
{% block head-title %}{% endblock %}

{% block nav %}{% endblock %}

{% block content %}

<div class="row">

  <div class="col-lg-8 ml-lg-auto mr-md-auto">

    {% if user and user.is_staff %}
      {% blocktrans trimmed asvar p1 with api_token=user.auth_token.key %}
        API Token: <samp>{{ api_token }}</samp>
      {% endblocktrans %}
      {% trans "The API token will allow you to authorize external applications to access the site as staff." as p2 %}
      {% include "components/explainer-card.html" with type="info" %}
    {% endif %}

    <div class="card">
      <form id="reset-confirm" action="." method="POST">
      {% csrf_token %}

        {% trans "Password Change" context "page title" as title %}
        {% trans "Please enter your old password, then enter a new one." as text %}
        {% include "components/form-title.html" with emoji="🔐" p1="" p2="" %}

        {% include "components/form-main.html" %}

        {% trans "Change my password" context "button" as title %}
        {% trans "Cancel and go back to the site home page" as subtitle %}
        {% url 'tabbycat-index' as suburl %}
        {% include "components/form-submit.html" %}


      </form>
    </div>

  </div>

</div>

{% endblock %}
